package top.ed333.mcplugins.configurableevents.handler;

import org.bukkit.Bukkit;
import org.bukkit.event.Event;
import org.bukkit.event.Listener;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredListener;

import java.awt.*;

/** 处理器的注册 */
public class HandlerRegistry {
    public static void registerHandler(Handler handler, Listener listener, Plugin plugin) {
        Bukkit.getPluginManager().registerEvent(
                handler.getEventClass(),
                listener,
                handler.priorityBukkit(),
                handler.getAsEventExecutor(),
                plugin
        );
    }
}
